<template>
  <div class="tableClass1">
    
    <a-form>
      <a-form-item v-bind="formItemLayout" style="margin-bottom: 10px;" label="模板类型">
        <a-select disabled :value="mertype" @change="callback" style="width:60%" v-decorator="[
          'feeType',{ rules: [{ required: true, message: '请选择模板类型' }],
          
          }]"
          placeholder="请选择模板类型">
          <a-select-option value="offline_merchant">商户费率</a-select-option>
          <a-select-option value="agent">合作机构费率</a-select-option>
        </a-select>
      </a-form-item>
    </a-form>
    <keep-alive>
      <router-view />
    </keep-alive>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        formItemLayout: {
          labelCol: {
            xs: { span: 24 },
            sm: { span: 5 }
          },
          wrapperCol: {
            xs: { span: 24 },
            sm: { span: 20 },
            md: { span: 16 }
          }
        },
        mertype:"offline_merchant"
      };
    },
    mounted() {
      // this.mertype = this.$route.params.mertype;
      console.log(this.mertype)
      this.callback(this.mertype);
    },
    methods: {
      callback(value) {
        console.log(value);
        this.mertype = value
        if (value == "offline_merchant") {
          this.$router.push({ path: "/addnewrate/newMerRate" });
        } else if (value == "agent") {
          this.$router.push({ path: "/addnewrate/orgMerRate" });
        }
      }
    }
  };
</script>
<style scoped>
  .tableClass1 {
    /* overflow-x:hidden;
  overflow-y: auto;
  overflow: scroll;
  height: 100%; */
    /* padding-top: 30px; */
    padding:70px;
    background: #fff;
  }

  /*滚动条样式*/
  .tableClass1::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 4px;
    /*高宽分别对应横竖滚动条的尺寸*/
    height: 4px;
  }

  .tableClass1::-webkit-scrollbar-thumb {
    /*滚动条里面小方块*/
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.2);
  }

  .tableClass1::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.1);
  }
</style>